clc;clear;
theta = 2*pi/3;
a = 1.5*pi/180;
b = 0:45:315;
b = b *  pi / 180;
x = 0:0.3:2.1; 
x = x * 1852;
D = zeros(8, 8);
W = zeros(8, 8);
for i = 1:8
    for j = 1:8
        D(i,j) = 120 + x(1,j) * cos(b(1,i)) * tan(a);
    end
end
aa = zeros(1,8);
for i = 1:8
    aa(1,i) = atan(tan(a)*sin(b(i)));
end
for i = 1:8
    fi = pi/2 - theta/2 - aa(1,i);
    gama = pi/2 + aa(1,i) - theta/2;
    for j = 1:8
        W(i,j) = D(i,j) * sin(theta/2) * ((1/sin(gama))+(1/sin(fi))) * cos(aa(1,i));
    end
end


%% 可视化
[bb,xx]=meshgrid(b,x);	
bb = bb';
xx = xx';
% for i = 1:8
%     for j = 1:8
%         
%     end
% end
surf(bb*180/pi,xx/1852,W);
hXLabel = xlabel('β/°');
hYLabel = ylabel('l/海里');
hZLabel = zlabel('覆盖宽度/m');











